//
//  SummaryController.h
//  ProcessTimeBudget
//
//  Created by isempty.chiu on 2010/9/14.
//  Copyright 2010 LifeMotion. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface SummaryController : NSObject {	
	IBOutlet NSTableView*   summaryTable;
	IBOutlet NSTextField* budgetPercentLabel;
	IBOutlet NSTextField* occupancyPercentLabel;	
	IBOutlet NSSegmentedControl* summaryTypeSeg;
	
	IBOutlet NSTextField* budgetValue;
	IBOutlet NSSlider* budgetSlider;
	
	float selectedItemBudget_;
	NSSortDescriptor* alphabetSort_;
	NSSortDescriptor* valueSort_;
	
	NSMutableArray *tableContent_;	
	
	NSString *CandidateEventName_;
}

+(SummaryController*) sharedController;
@property (nonatomic, assign) float selectedItemBudget;
@property (nonatomic, readonly) NSString* CandidateEventName;

@property (nonatomic, retain) NSTableView * summaryTable;
@property (nonatomic, retain) NSTextField * budgetPercentLabel;
@property (nonatomic, retain) NSTextField * occupancyPercentLabel;
@property (nonatomic, retain) NSSegmentedControl * summaryTypeSeg;
@property (nonatomic, retain) NSTextField * budgetValue;
@property (nonatomic, retain) NSSlider * budgetSlider;

- (int)numberOfRowsInTableView:(NSTableView *)aTableView;

- (id)     tableView:(NSTableView *) aTableView
objectValueForTableColumn:(NSTableColumn *) aTableColumn
				 row:(int) rowIndex;

- (void)tableView:(NSTableView *)aTableView sortDescriptorsDidChange:(NSArray *)oldDescriptors;
- (void)tableViewSelectionDidChange:(NSNotification *)aNotification;
- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject
   forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;

- (IBAction)summaryTypeSelected:(id)sender;
- (IBAction)budgetChangeAction:(id)sender;

@end
